package entity;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Record extends BaseEntity {
	private String recordID;
	private Date recordDate;
	private String reponsibleStaffName;

	public Record(String dataString) throws ParseException, NoSuchFieldException, SecurityException, IllegalArgumentException, IllegalAccessException {
		String[] attrVal = dataString.split(" ");
		this.setRecordID(attrVal[0]);

		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-mm-dd");
		this.setRecordDate(formatter.parse(attrVal[1]));
		this.setReponsibleStaffName(attrVal[2]);
	}

	public String getReponsibleStaffName() {
		return reponsibleStaffName;
	}

	public void setReponsibleStaffName(String reponsibleStaffName) {
		this.reponsibleStaffName = reponsibleStaffName;
	}

	public Date getRecordDate() {
		return recordDate;
	}

	public void setRecordDate(Date recordDate) {
		this.recordDate = recordDate;
	}

	public String getRecordID() {
		return recordID;
	}

	public void setRecordID(String recordID) {
		this.recordID = recordID;
	}

}
